#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<assert.h>
#include<string.h>
char* my_strncat(char* dest, const char* src, size_t num)
{
	assert(dest != 0);
	assert(src != 0);
	char* tmp = dest;
	while (*dest)
		dest++;
	while (num && *src)
	{
		*dest = *src;
		dest++;
		src++;
		num--;
	}
	return tmp;
}
int main()
{
	char a[20] = "abcde";
	char b[] = "fghijk";
	printf("%s", my_strncat(a, b, 5));
	return 0;
}